<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>修改</title>
    <link rel="stylesheet" th:href="@{/static/layui/css/layui.css}"/>

</head>
<body>
<div>
    <div style="position: relative;top: 30px;left: 20px">
        <form class="layui-form" th:action="@{'/add'}">
            <div class="layui-form-item">
                <label class="layui-form-label">ID</label>
                <div class="layui-input-block">
                    <input type="text" name="ID" required disabled="disabled">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">名字</label>
                <div class="layui-input-block">
                    <input type="text" name="name" required>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码框</label>
                <div class="layui-input-inline">
                    <input type="password" name="password" required lay-verify="required"
                           placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">注册</button>
                    <button type="reset" class="layui-btn layui-btn-primary">
                        <a th:href="@{/index.html}">返回</a></button>
                </div>
            </div>
        </form>
    </div>
    <script th:href="@{/static/layui/layui.js}"></script>

    <script>
        //Demo
        layui.use('form', function () {
            var form = layui.form;

            //监听提交
            form.on('submit(formDemo)', function (data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
        });
    </script>
</div>

</body>
</html>
